namespace IrisGenerator.Dal {
    using System;
    using System.Collections.Generic;
    using System.Data.SqlClient;
    using System.Configuration;
    using System.Data;
    using System.Xml;
    
    
    public partial class MetatypeEquivalences : IDisposable {
        
        private DataAccess _dataAccess;
        
        public MetatypeEquivalences() {
            this._dataAccess = new DataAccess();
        }
        
        public virtual System.Data.DataSet Select_METATYPE_EQUIVALENCES_By_MET_ID(System.Nullable<System.Guid> MET_ID) {
            this._dataAccess.CreateProcedureCommand("sp_Select_METATYPE_EQUIVALENCES_By_MET_ID");
            this._dataAccess.AddParameter("MET_ID", MET_ID, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet Select_METATYPE_EQUIVALENCES_By_TAR_ID(System.Nullable<System.Guid> TAR_ID) {
            this._dataAccess.CreateProcedureCommand("sp_Select_METATYPE_EQUIVALENCES_By_TAR_ID");
            this._dataAccess.AddParameter("TAR_ID", TAR_ID, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet METATYPE_EQUIVALENCES_Select_All() {
            this._dataAccess.CreateProcedureCommand("sp_METATYPE_EQUIVALENCES_Select_All");
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet METATYPE_EQUIVALENCES_Select_One(System.Nullable<System.Guid> TAR_ID, System.Nullable<System.Guid> MET_ID) {
            this._dataAccess.CreateProcedureCommand("sp_METATYPE_EQUIVALENCES_Select_One");
            this._dataAccess.AddParameter("TAR_ID", TAR_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MET_ID", MET_ID, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Nullable<int> METATYPE_EQUIVALENCES_Insert(System.Nullable<System.Guid> TAR_ID, System.Nullable<System.Guid> MET_ID, string MET_EQU_TYPE, System.Nullable<bool> MET_EQU_SPECIFY_LENGTH, System.Nullable<bool> MET_EQU_SPECIFY_PRECISION) {
            this._dataAccess.CreateProcedureCommand("sp_METATYPE_EQUIVALENCES_Insert");
            this._dataAccess.AddParameter("TAR_ID", TAR_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MET_ID", MET_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MET_EQU_TYPE", MET_EQU_TYPE, ParameterDirection.Input);
            this._dataAccess.AddParameter("MET_EQU_SPECIFY_LENGTH", MET_EQU_SPECIFY_LENGTH, ParameterDirection.Input);
            this._dataAccess.AddParameter("MET_EQU_SPECIFY_PRECISION", MET_EQU_SPECIFY_PRECISION, ParameterDirection.Input);
            int value = this._dataAccess.ExecuteNonQuery();
            return value;
        }
        
        public virtual System.Nullable<int> METATYPE_EQUIVALENCES_Delete(System.Nullable<System.Guid> TAR_ID, System.Nullable<System.Guid> MET_ID) {
            this._dataAccess.CreateProcedureCommand("sp_METATYPE_EQUIVALENCES_Delete");
            this._dataAccess.AddParameter("TAR_ID", TAR_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MET_ID", MET_ID, ParameterDirection.Input);
            int value = this._dataAccess.ExecuteNonQuery();
            return value;
        }
        
        public virtual System.Nullable<int> METATYPE_EQUIVALENCES_Update(System.Nullable<System.Guid> TAR_ID, System.Nullable<System.Guid> MET_ID, string MET_EQU_TYPE, System.Nullable<bool> MET_EQU_SPECIFY_LENGTH, System.Nullable<bool> MET_EQU_SPECIFY_PRECISION) {
            this._dataAccess.CreateProcedureCommand("sp_METATYPE_EQUIVALENCES_Update");
            this._dataAccess.AddParameter("TAR_ID", TAR_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MET_ID", MET_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("MET_EQU_TYPE", MET_EQU_TYPE, ParameterDirection.Input);
            this._dataAccess.AddParameter("MET_EQU_SPECIFY_LENGTH", MET_EQU_SPECIFY_LENGTH, ParameterDirection.Input);
            this._dataAccess.AddParameter("MET_EQU_SPECIFY_PRECISION", MET_EQU_SPECIFY_PRECISION, ParameterDirection.Input);
            int value = this._dataAccess.ExecuteNonQuery();
            return value;
        }
        
        public virtual void Dispose() {
            if ((this._dataAccess != null)) {
                this._dataAccess.Dispose();
            }
        }
    }
}
